<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http:dream/cust_tag.tld" prefix="page"%>
<c:forEach var="vo" varStatus="vs" items="${pageVO.details}">
	<tr id="item${vs.count}">
		<td class="text-left ellipsis">
			<c:out value="${vo.shop.name}"/>
		</td>
		<td class="text-center ellipsis" >
			<c:out value="${vo.productPartId}"/>
		</td>
		<td class="text-center ellipsis" >
			 <c:out value="${vo.productPart.name}"/>
		</td>
		<td>
			<spring:message code="${vo.stockType}"/>
		</td>
		<td class="text-center" >
			${vo.stock * vo.productPart.netPrice }
		</td>
		<td class="text-center" >
			 <input type="text" class="input-xlarge input-sm" id="stock${vs.count}" value="${vo.stock}"  maxlength="5" disabled="disabled"/>
		</td>
		<td class="text-center">
			<button id="btnUpdate${vs.count}" type="button" class="btn btn-warning btn-small" onclick="updateStock('${vs.count}')" >
				修改
			</button>
			<button id="btnSave${vs.count}" type="button"  class="btn btn-success btn-small hide" onclick="saveStock('${vo.id}','${vs.count}')" >
				保存
			</button>
			<button id="btnCancel${vs.count}" type="button"  class="btn btn-default btn-small hide" onclick="cancelStock('${vs.count}')" >
				取消
			</button>
		</td>
	</tr>
</c:forEach>
<tr>
<td colspan="7" class="text-center" >
	<page:webpaging function="common.ajaxPagingQuery('${root}/stock/list')" totalCount="${pageVO.count}"></page:webpaging>
</td>
</tr>
 		


